<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:pe="http://primefaces.org/ui/extensions"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:fn="http://java.sun.com/jsp/jstl/functions">
    <ui:composition template="/layout/masterpage_admin.xhtml">
          <f:metadata>
            
            <f:event type="preRenderView" listener="#{sys_NguoiDungController.onPageLoad_CheckAdmin()}">
                
            </f:event>
        </f:metadata>
         <ui:define name="ui-header">
             <title>#{utilsController.getLanguages("NganHang")}</title>
        </ui:define>
        
        
        <ui:define name="ui-content">
            
            <h:form id="frmnganhang">
                <c:set var="vNganHang" value="#{sI_NganHangController.findAllNganHang()}" scope="session"/>
                
               <div class="btn-group">
                   <a href="/Admin/si/banks/new.html" class="btn btn-default">#{utilsController.getLanguages("TaoMoi")}</a>
                  </div>

                 <div class="panel panel-sea margin-bottom-40">
                    <div class="panel-heading">
                        <h3 class="panel-title"><i class="fa fa-edit"></i>#{utilsController.getLanguages("NganHang")}</h3>
                    </div>
                    <table class="table table-striped">
                        <thead>
                            <tr>
                                <th>#{utilsController.getLanguages("NganHangID")}</th>
                                <th>#{utilsController.getLanguages("TenNH")}</th>
                                <th>#{utilsController.getLanguages("TrangThai")}</th>
                                <th>#</th>
                            </tr>
                        </thead>
                        <tbody>
                            <c:forEach items="#{vNganHang}" var="item">
                                <tr>
                                    
                                    <td>#{item.getID()}</td>
                                     <td>#{item.getTenNH()}</td>
                                      <td>#{item.getTrangThai()}</td>
                                      <td>
                                          <button class="btn btn-primary btn-xs" type="button" onclick="Update_nganhang_Click('#{item.getID()}');"><i class="fa fa-truck-o"></i> #{utilsController.getLanguages("Update")}</button>
                                          <button class="btn btn-danger btn-xs" onclick="Delete_nganhang_Click('#{item.getID()}','#{utilsController.getLanguages('CoChacBanMuonXoaDuLieu')}');" type="button"><i class="fa fa-trash-o"></i> #{utilsController.getLanguages("Delete")}</button>
                                          
                                      </td>
                                </tr>
                                
                            </c:forEach>
                            
                            
                        </tbody>
                    </table>
                </div>
                <p:remoteCommand name="Update_NganHang" actionListener="#{sI_NganHangController.btnUpdate_Click}" update=":frmnganhang"></p:remoteCommand>
                <p:remoteCommand name="Delete_NganHang" actionListener="#{sI_NganHangController.btnDelete_Click}" update=":frmnganhang"></p:remoteCommand>
                
            </h:form>
        </ui:define>
    </ui:composition> 
</html>